<%- include header %>
<!-- 主题内容start -->


<div style="background-color: white;border: 1px solid #ffffff;border-radius: 6px;margin-top: 20px;padding: 1%">
    <div style="text-align: center">
        <h3><%=__('forumEntry').publish%></h3>
        <form onsubmit="return checkueditor();" class="registerform form-horizontal" method="post" style="margin-left: 10%">
            <table width="100%" style="table-layout:fixed;">
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:80px;line-height: 30px"><%=__('post').title%>：</td>
                    <td style="width:205px;"><input type="text" name="theme" class="inputxt"  datatype="*2-30" errormsg="标题为2-30个任意字符！" /></td>
                    <td><div class="Validform_checktip"></div></td>
                </tr>
                <tr>
                    <td class="need" style="width:10px;">*</td>
                    <td style="width:80px;"><%=__('post').content%>：</td>
                    <td style="width:205px;">
                        <script id="ucontainer" name="content" type="text/plain"></script>
                    </td>
                </tr>
                <tr>
                    <td class="need" style="width:10px;line-height: 35px">*</td>
                    <td style="width:80px;line-height: 30px"><%=__('post').lan%>：</td>
                    <td style="width:205px;">
                        <select name="bbsPlate" datatype="*">
                            <% datas.forEach(function(data,index){ %>
                            <option value="<%- data._id %>"><%- data.platename %></option>
                            <% }) %>
                        </select>
                    </td>
                    <td><div class="Validform_checktip"></div></td>
                </tr>
                <tr>
                    <td class="need"></td>
                    <td></td>
                    <td colspan="2" style="padding:10px 0 18px 0;">
                        <input class="btn btn-primary" type="submit" value="<%=__('post').pub%>">
                    </td>
                </tr>
            </table>

        </form>
    </div>
    <div class="control-group" style="margin-left: 10%;">

        <div class="controls" style="border:2px #ff6500 solid;width: 80%;padding: 10px">

            <%=__('post').m1%><br>
            <%=__('post').m2%><br>
            <%=__('post').m3%>

        </div>
    </div>
</div>


<!-- 主题内容end -->
<%- include footer %>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var ue = UE.getEditor('ucontainer',{
        initialFrameWidth:650,
        enableAutoSave:false,
        initialFrameHeight:171,
        saveInterval:60000
    });

</script>
<script type="text/javascript">
    $(function(){
        //$(".registerform").Validform();  //就这一行代码！;

        $(function(){
            //$(".registerform").Validform();  //就这一行代码！;

            $(".registerform").Validform({
                tiptype:2
            })


        })
    })
    function checkueditor(){

        //alert(UE.getEditor('container').getContent().replace(/[\s\r\n]/g,'').length)
        if(UE.getEditor('ucontainer').getContent().replace(/<.*?>/g,'').length==0){
            alert('<%=__('post').alert%>')
            return false;
        }
        return true;
    }
</script>